package com.hqyj.springbootday01.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * Country
 */
@Data
public class Country {
	private int countryId;
	private String countryName;
	private String localCountryName;
	private String countryCode;
	private String countryCode2;
	private String continent;
	private String region;
	private double surfaceArea;
	private int indepYear;
	private int population;
	private double lifeExpectancy;
	private double gnp;
	private String governmentForm;
	private String headOfState;
	private int capital;
	private String timeZone;
	private int languageId;
	private int currencyId;
	@JsonSerialize(using = LocalDateTimeSerializer.class)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime dateModified;
	@JsonSerialize(using = LocalDateTimeSerializer.class)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime dateCreated;
	private List<City> cities;


}
